import NotAccessPage from '@/components/NotAccessPage';
import { useAccess } from '@umijs/max';
import React from 'react';
import RankRecord from '../rank/RankRecord';
import TabRecord from '../record/TabRecord';

interface PageContainerMonthEmphasizeProps {}

const PageContainerMonthEmphasize: React.FC<PageContainerMonthEmphasizeProps> = ({}) => {
  const access = useAccess();

  const container = () => {
    if (access.传播质效x页面 && access.传播质效x配置x管理员) {
      return <RankRecord />;
    } else if (access.传播质效x页面 && access.传播质效x配置x运营员) {
      return <TabRecord />;
    } else {
      return <NotAccessPage />;
    }
  };

  return container();
};

export default PageContainerMonthEmphasize;
